package com.nexen.system.service.impl;

import java.util.List;
import com.nexen.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nexen.system.mapper.SysUserHisotryMapper;
import com.nexen.system.domain.SysUserHisotry;
import com.nexen.system.service.ISysUserHisotryService;

/**
 * 用户密码修改历史Service业务层处理
 * 
 * @author xiao
 * @date 2024-08-08
 */
@Service
public class SysUserHisotryServiceImpl implements ISysUserHisotryService 
{
    @Autowired
    private SysUserHisotryMapper sysUserHisotryMapper;

    /**
     * 查询用户密码修改历史
     * 
     * @param id 用户密码修改历史主键
     * @return 用户密码修改历史
     */
    @Override
    public SysUserHisotry selectSysUserHisotryById(Long id)
    {
        return sysUserHisotryMapper.selectSysUserHisotryById(id);
    }

    /**
     * 查询用户密码修改历史列表
     * 
     * @param sysUserHisotry 用户密码修改历史
     * @return 用户密码修改历史
     */
    @Override
    public List<SysUserHisotry> selectSysUserHisotryList(SysUserHisotry sysUserHisotry)
    {
        return sysUserHisotryMapper.selectSysUserHisotryList(sysUserHisotry);
    }

    /**
     * 新增用户密码修改历史
     * 
     * @param sysUserHisotry 用户密码修改历史
     * @return 结果
     */
    @Override
    public int insertSysUserHisotry(SysUserHisotry sysUserHisotry)
    {
        sysUserHisotry.setCreateTime(DateUtils.getNowDate());
        return sysUserHisotryMapper.insertSysUserHisotry(sysUserHisotry);
    }

    /**
     * 修改用户密码修改历史
     * 
     * @param sysUserHisotry 用户密码修改历史
     * @return 结果
     */
    @Override
    public int updateSysUserHisotry(SysUserHisotry sysUserHisotry)
    {
        sysUserHisotry.setUpdateTime(DateUtils.getNowDate());
        return sysUserHisotryMapper.updateSysUserHisotry(sysUserHisotry);
    }

    /**
     * 批量删除用户密码修改历史
     * 
     * @param ids 需要删除的用户密码修改历史主键
     * @return 结果
     */
    @Override
    public int deleteSysUserHisotryByIds(Long[] ids)
    {
        return sysUserHisotryMapper.deleteSysUserHisotryByIds(ids);
    }

    /**
     * 删除用户密码修改历史信息
     * 
     * @param id 用户密码修改历史主键
     * @return 结果
     */
    @Override
    public int deleteSysUserHisotryById(Long id)
    {
        return sysUserHisotryMapper.deleteSysUserHisotryById(id);
    }
}
